home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Present…nuary (Partner) - Disc 2 / The Apple Reference and Presentations Library (Disc 2)(January 1994).iso / Graphisoft / US English / ArchiCAD / ArchiCAD 4.5-68K / ArchiCAD Library / 08 Doors & Windows / Window Macros / oct_frame < prev    next >
Text File  |  1994-04-08  |  966b  |  86 lines

  1. ! oct_frame  /rewritten 2/22/94/***VL/
  2. ! a, b, frame width, frame thickness,
  3. ! glass material, internal frame width
  4. !print a,b,c,d,e,f
  5.  
  6. k=f                        ! internal frame width
  7. v=sqr(2)-1
  8. z=a/2
  9. w=b/2
  10. g=1-2*c/a
  11. h=a/2-c
  12. i=b/2-c
  13. if g<0.0001 then 20
  14. if h<0.0001 then 20
  15. if i<0.0001 then 20
  16. j=1-k/h
  17. l=z*g/h
  18. m=w*g/i
  19.  
  20. addy b/2
  21. mulx z
  22. muly w
  23.  
  24. prism_ 18,d,
  25. 1,v,15,
  26. v,1,15,
  27. -v,1,15,
  28. -1,v,15,
  29. -1,-v,15,
  30. -v,-1,15,
  31. v,-1,15,
  32. 1,-v,15,
  33. 1,v,-1,
  34. g,v*g,15,
  35. v*g,g,15,
  36. -v*g,g,15,
  37. -g,v*g,15,
  38. -g,-v*g,15,
  39. -v*g,-g,15,
  40. v*g,-g,15,
  41. g,-v*g,15,
  42. g,v*g,-1
  43.  
  44. del 2
  45. addz d/4
  46. mulx h
  47. muly i
  48.  
  49. prism_ 18,d/2,
  50. l,-v*m,15,
  51. v*l,-m,15,
  52. -v*l,-m,15,
  53. -l,-v*m,15,
  54. -l,v*m,15,
  55. -v*l,m,15,
  56. v*l,m,15,
  57. l,v*m,15,
  58. l,-v*m,-1,
  59. j,v*j,15,
  60. v*j,j,15,
  61. -v*j,j,15,
  62. -j,v*j,15,
  63. -j,-v*j,15,
  64. -v*j,-j,15,
  65. v*j,-j,15,
  66. j,-v*j,15,
  67. j,v*j,-1
  68. body 1
  69. if e=0 then 20
  70. !*** glass only
  71. addz d/4-0.002
  72. material e
  73. prism_ 9,0.004,
  74. j,0,15,
  75. j,-v*j,15,
  76. v*j,-j,15,
  77. -v*j,-j,15,
  78. -j,-v*j,15,
  79. -j,v*j,15,
  80. -v*j,j,15,
  81. v*j,j,15,
  82. j,v*j,15
  83. body 1
  84. 20:
  85. end
  86.